import Vue from 'vue'
import App from './App.vue'

// 1, 引入Vuex
import Vuex from "vuex";

// 2. 安装Vuex
Vue.use(Vuex)

// 3. 创建Store对象
const store = new Vuex.Store({
  state: {
    num: 0
  },
  mutations: {
    increment(state) {
      state.num++
    }
  }
})
new Vue({
  render: h => h(App),
  // 4.应用
  store
}).$mount('#app')
